import { integralGoodsDetail } from '@/api/my'
const ERR_OK = 200
export default {
  data () {
    return {
      goodsDetailInfo: null
    }
  },
  created () {
    if (this.$route.query.id) {
      this._integralGoodsDetail(this.$route.query.id)
    }
  },
  methods: {
    _integralGoodsDetail (id) {
      integralGoodsDetail(id)
        .then(res => {
          if (res.code === ERR_OK) {
            this.goodsDetailInfo = res.data
          }
        })
        .catch(err => {
          console.log(err)
        })
    }
  }
}
